Optical distortion correction for imaged samples

ABSTRACT

Techniques are described for dynamically correcting image distortion during imaging of a patterned sample having repeating spots. Different sets of image distortion correction coefficients may be calculated for different regions of a sample during a first imaging cycle of a multicycle imaging run and subsequently applied in real time to image data generated during subsequent cycles. In one implementation, image distortion correction coefficients may be calculated for an image of a patterned sample having repeated spots by: estimating an affine transform of the image; sharpening the image; and iteratively searching for an optimal set of distortion correction coefficients for the sharpened image, where iteratively searching for the optimal set of distortion correction coefficients for the sharpened image includes calculating a mean chastity for spot locations in the image, and where the estimated affine transform is applied during each iteration of the search.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is a continuation of U.S. application Ser. No.17/162,928, filed on Jan. 29, 2021, now U.S. Pat. No. 11,568,522, andentitled “Optical Distortion Correction for Imaged Samples,” which is ais a continuation of U.S. application Ser. No. 16/192,608, filed on Nov.15, 2018, now U.S. Pat. No. 10,909,666, and entitled “Optical DistortionCorrection for Imaged Samples,” which is a is a continuation of U.S.application Ser. No. 15/909,437, filed on Mar. 1, 2018, now U.S. Pat.No. 10,152,776, and entitled “Optical Distortion Correction for ImagedSamples,” which claims the benefit of U.S. Provisional PatentApplication No. 62/468,347 filed on Mar. 7, 2017 and entitled “OpticalDistortion Correction for Imaged Samples,” each of which is incorporatedherein by reference in its entirety. The present application also claimsthe benefit of Netherlands Patent Application No. N2018852 filed on May5, 2017, and entitled “Optical Distortion Correction for ImagedSamples.”

BACKGROUND

One problem with imaging with an optical lens is that the geometry of alens induces different types of distortion in the image. Suchdistortions may include, for example, magnification distortion, skewdistortion, translation distortion, and nonlinear distortions such asbarrel distortion and pincushion distortion. These distortions aregenerally more pronounced in image points that are further off centerfrom the center of the image.

In line scanners that scan a plane of a sample in one direction,distortion may be most pronounced in one dimension along the edges ofthe scanned image perpendicular to the direction of scanning. Forexample, an aberration caused by an objective lens or other opticalcomponent of the optical system may introduce a “stretching distortion,”whereby the magnification varies along one axis (e.g. the x axis in thecase of a line that is scanned along that axis). This distortion isparticularly detrimental for multi-cycle imaging of substrates having alarge number (e.g. thousands, millions, billions, etc.) of patternedspots, as it may shift the actual position of spots on the scanned imageaway from the expected position of the spots. This may cause a drop indata throughput and an increase in error rate during a multi-cycleimaging run. This problem is illustrated by FIGS. 1A-1B. FIG. 1A shows acenter of a scanned image of a patterned target having a plurality ofsample regions with a fluorescing dye. At the center of the image, thereis no detectable distortion of spots 50. FIG. 1B shows a right side ofthe scanned image of FIG. 1A. In the right side, optical distortion ofspots 50 becomes noticeable.

SUMMARY

Examples disclosed herein are directed to techniques for correctingoptical distortion in imaged samples.

In a first example, a method includes: performing a first imaging cycleof a patterned sample comprising a plurality of spots; dividing a firstset of imaging data generated during the first imaging cycle into afirst plurality of imaging data subsets, each of the first plurality ofimaging data subsets corresponding to a respective region of thepatterned sample, each of the respective regions of the patterned samplecomprising a plurality of spots; calculating a set of image distortioncorrection coefficients for each of the first plurality of imaging datasubsets; performing a second imaging cycle of the patterned sample togenerate a second set of imaging data; and dividing the second set ofimaging data generated during the second imaging cycle into a secondplurality of imaging data subsets, each of the second plurality ofimaging data subsets corresponding to the same respective region of thepatterned sample as one of the first plurality of imaging data subsets;and for each of the second plurality of imaging data subsets, applyingthe distortion correction coefficients calculated for the one of thefirst plurality of imaging data subsets corresponding to the samerespective region of the patterned sample.

In one implementation of the first example, each of the spots of thepatterned sample includes fluorescently tagged nucleic acids, the firstimaging cycle is a first sequencing cycle, and the second imaging cycleis a second sequencing cycle.

In one implementation of the first example, the first set of imagingdata and the second the set of imaging data each respectively includesimaging data of a first color channel and imaging data of a second colorchannel, and calculating a set of image distortion correctioncoefficients for each of the first plurality of imaging data subsetsincludes determining a set of distortion correction coefficients foreach color channel of each imaging data subset.

In one implementation of the first example, calculating a set of imagedistortion correction coefficients for each of the first plurality ofimaging data subsets, includes: estimating an affine transform of theimaging data subset; sharpening the imaging data subset; and iterativelysearching for an optimal set of distortion correction coefficients forthe imaging data subset.

In one implementation of the first example, the first set of imagingdata and the second set of imaging data are divided using at least theposition of fiducials on the sample, and the affine transform for eachof the first plurality of imaging data subsets is estimated using thefiducials.

In a second example, a method for correcting for optical distortion inan image of a patterned sample comprising a plurality of spots includes:estimating an affine transform of the image; sharpening the image; anditeratively searching for an optimal set of distortion correctioncoefficients for the sharpened image, where iteratively searching forthe optimal set of distortion correction coefficients for the sharpenedimage includes calculating a mean chastity for a plurality of spotlocations in the image, and where the estimated affine transform isapplied during each iteration of the search.

In one implementation of the second example, iteratively searching foran optimal set of distortion correction coefficients for the sharpenedimage includes: generating a set of optical distortion correctioncoefficients for the image; applying the estimated affine transform tothe plurality of spot locations in the image; and after applying theestimated affine transform, applying the set of optical distortioncorrection coefficients to each of the plurality of spot locations. In afurther implementation, the method includes: after applying the set ofoptical distortion correction coefficients to each of the plurality ofspot locations, extracting a signal intensity for each of the pluralityof spot locations. In yet a further implementation, the method includes:normalizing the extracted signal intensities; and calculating a meanchastity for the plurality of spot locations using at least thenormalized signal intensities.

In a particular implementation of the second example, calculating a meanchastity for the plurality of spot locations using at least thenormalized signal intensities includes: for each of the plurality ofspot locations determining a chastity using at least a distance from apoint corresponding to the spot location's normalized signal intensityto a Gaussian centroid.

In a particular implementation of the second example, iterativelysearching for an optimal set of distortion correction coefficients forthe sharpened image includes subsampling a plurality of spots in theimage, where if a spot in a row of the sharpened image is subsampled,then all spots in the row of the sharpened image are subsampled.

Other features and aspects of the disclosed technology will becomeapparent from the following detailed description, taken in conjunctionwith the accompanying drawings, which illustrate, by way of example, thefeatures in accordance with examples of the disclosed technology. Thesummary is not intended to limit the scope of any inventions describedherein, which are defined by the claims and equivalents.

It should be appreciated that all combinations of the foregoing concepts(provided such concepts are not mutually inconsistent) are contemplatedas being part of the inventive subject matter disclosed herein. Inparticular, all combinations of claimed subject matter appearing at theend of this disclosure are contemplated as being part of the inventivesubject matter disclosed herein.

BRIEF DESCRIPTION OF THE DRAWINGS

The present disclosure, in accordance with one or more various examples,is described in detail with reference to the following figures. Thefigures are provided for purposes of illustration only and merely depicttypical or example implementations.

FIG. 1A shows, in one example, a center of a scanned image of apatterned target having a plurality of sample regions with a fluorescingdye.

FIG. 1B shows a right side of the scanned image of FIG. 1A.

FIG. 2A illustrates, in one example, a generalized block diagram of anexample image scanning system with which systems and methods disclosedherein may be implemented.

FIG. 2B is block diagram illustrating an example two-channel,line-scanning modular optical imaging system that may be implemented inparticular implementations.

FIG. 3 illustrates an example configuration of a patterned sample thatmay be imaged in accordance with implementations disclosed herein.

FIG. 4 is an operational flow diagram illustrating an example methodthat may be implemented for dynamically correcting image distortionduring an imaging run in accordance with the disclosure.

FIG. 5 visually illustrates, in one example, how the imaging data may bedivided into a plurality of imaging data subsets for an N-channelimaging system that images a sample having an array of spots.

FIG. 6 is an operational flow diagram illustrating an example method ofcalculating distortion correction coefficients for imaging datagenerated by an imaging system.

FIG. 7 illustrates an example tile including six fiducials.

FIG. 8 illustrates example clouds derived from two-channel base callingduring one sequencing cycle.

FIG. 9A illustrates, in one example, a collection of distortion curvesfor a set of tiles for optics that happen to be on a two-channelsequencing instrument that uses flow cells.

FIG. 9B illustrates, in one example, a collection of distortion curvesfor a set of tiles for optics that happen to be on another two-channelsequencing instrument that uses flow cells.

FIG. 9C illustrates, in one example, four distortion curvescorresponding to two different color channels for a set of tiles foroptics that happen to be on a four-channel sequencing instrument thatuses flow cells.

FIG. 10A is a box and whiskers plot of example experimental resultsillustrating what percent of spots of a flow cell sequenced using a linescanner passed a chastity filter (% PF) without distortion correction,binned across the field of view of a tile with respect to X.

FIG. 10B is a box and whiskers plot of example experimental resultsshowing what percent of spots of a sequenced flow cell passed a chastityfilter after distortion correction.

FIG. 11 is an operational flow diagram illustrating an example methodfor determining optical distortion correction parameters that may beused to optimize a design of an imaging lens (e.g., an objective lens).

FIG. 12 is a residual distortion plot showing example residual opticaldistortion in pixels across the field of view of a lens after applying afifth order polynomial to correct for distortion.

FIG. 13 illustrates an example computing module that may be used toimplement various features of implementations described in the presentdisclosure.

The figures are not exhaustive and do not limit the present disclosureto the precise form disclosed.

DETAILED DESCRIPTION

As used herein to refer to a sample, the term “spot” or “feature” isintended to mean a point or area in a pattern that can be distinguishedfrom other points or areas according to relative location. An individualspot can include one or more molecules of a particular type. Forexample, a spot can include a single target nucleic acid molecule havinga particular sequence or a spot can include several nucleic acidmolecules having the same sequence (and/or complementary sequence,thereof).

As used herein, the term “fiducial” is intended to mean adistinguishable point of reference in or on an object. The point ofreference can be present in an image of the object or in another dataset derived from detecting the object. The point of reference can bespecified by an x and/or y coordinate in a plane of the object.Alternatively or additionally, the point of reference can be specifiedby a z coordinate that is orthogonal to the xy plane, for example, beingdefined by the relative locations of the object and a detector. One ormore coordinates for a point of reference can be specified relative toone or more other features of an object or of an image or other data setderived from the object.

As used herein, the term “tile” generally refers to one or more imagesof the same region of a sample, where each of the one or more imagesrepresents a respective color channel. A tile may form an imaging datasubset of an imaging data set of one imaging cycle.

As used herein, the term “chastity” generally refers to a scoring metricthat provides a measure of the overall “quality” of a spot location on atile. Chastity may be determined both before and after applyingdistortion correction coefficients to a spot location. Mean chastityrefers to an average of the chastity over all spot locations or a subsetof spot locations on a tile.

As used herein, the term “xy plane” is intended to mean a 2 dimensionalarea defined by straight line axes x and y in a Cartesian coordinatesystem. When used in reference to a detector and an object observed bythe detector, the area can be further specified as being orthogonal tothe direction of observation between the detector and object beingdetected. When used herein to refer to a line scanner, the term “ydirection” refers to the direction of scanning.

As used herein, the term “z coordinate” is intended to mean informationthat specifies the location of a point, line or area along an axes thatis orthogonal to an xy plane. In particular implementations, the z axisis orthogonal to an area of an object that is observed by a detector.For example, the direction of focus for an optical system may bespecified along the z axis.

As used herein, the term “scan a line” is intended to mean detecting a2-dimensional cross-section in an xy plane of an object, thecross-section being rectangular or oblong, and causing relative movementbetween the cross-section and the object. For example, in the case offluorescence imaging an area of an object having rectangular or oblongshape can be specifically excited (at the exclusion of other areas)and/or emission from the area can be specifically acquired (at theexclusion of other areas) at a given time point in the scan.

Implementations disclosed herein are directed to dynamically correctingimage distortion during imaging of a patterned sample having a pluralityof repeating spots. Image distortion correction coefficients may becalculated during a first imaging cycle of a multicycle imaging run(e.g., a sequencing run) and subsequently applied in real time to imagedata generated during subsequent cycles.

In a first implementation, imaging data generated during a calibrating(e.g., first) imaging cycle of a sample may be divided into a pluralityof imaging data subsets (e.g., tiles) corresponding to a respectiveregion of the patterned sample. Each tile may contain a plurality ofspots corresponding to a respective plurality of sampled spots in theregion of the patterned sample. A set of distortion correctioncoefficients may be calculated for each tile. In cases a tile includesimaging data for multiple color channels, a set of distortion correctioncoefficients may be generated for each color channel of the tile. Duringsubsequent imaging cycles of the patterned sample, each set ofdistortion coefficients calculated during the calibrating imaging cyclemay be applied to a respective tile. In this manner, image distortionmay be independently corrected for different regions of the sample. Thisregion-specific distortion correction permits correction of distortionfor which a global rigid registration fails to consider. For example,nonlinear distortion (not accounted for by the linear affine transform)can be induced by the shape of the lens. In addition, the imagedsubstrate can also introduce distortion in the pattern due to themanufacturing process, e.g. a 3D bath tub effect introduced by bondingor movement of the wells due to non-rigidity of the substrate. Finally,the tilt of the substrate within the holder is not accounted for by thelinear affine transform.

In a second implementation, a particular method for generatingdistortion correction coefficients for a tile is described. The methodincludes the steps of estimating a single affine transform of the tileusing fiducials in the tile, sharpening the tile, and running a searchfor distortion correction coefficients that maximize mean chastity of aplurality of spots in the tile. By performing only a single affinetransform of the image, the disclosed method may dramatically reduce thetime needed to search for an optimum set of distortion correctioncoefficients. In a particular implementation, the search for thedistortion correction coefficients may iterate the steps of: generatinga set of distortion correction coefficients, applying the generateddistortion correction coefficients to each spot location in the image,extracting signal intensity for each spot location in the image,spatially normalizing the signal intensities, calculating a meanchastity of the plurality of spot locations in the tile, and determiningwhether to iterate the search for distortion correction coefficientsusing at least the calculated mean chastity.

In particular implementations, the disclosed method for generatingdistortion correction coefficients may be used to correct imagedistortion in image data including two different color channel imagesthat encode the identity of four different samples (e.g., four differentDNA base types) as a combination of the intensities of the two images.

Before describing various implementations of the systems and methodsdisclosed herein, it is useful to describe an example environment withwhich the technology disclosed herein can be implemented. One suchexample environment is that of an imaging system 100 illustrated in FIG.2A. The example imaging system may include a device for obtaining orproducing an image of a sample. The example outlined in FIG. 2A shows anexample imaging configuration of a backlight design implementation. Itshould be noted that although systems and methods may be describedherein from time to time in the context of example imaging system 100,these are only examples with which implementations of the imagedistortion correction methods disclosed herein may be implemented.

As can be seen in the example of FIG. 2A, subject samples are located onsample container 110 (e.g., a flow cell as described herein), which ispositioned on a sample stage 170 under an objective lens 142. Lightsource 160 and associated optics direct a beam of light, such as laserlight, to a chosen sample location on the sample container 110. Thesample fluoresces and the resultant light is collected by the objectivelens 142 and directed to an image sensor of camera system 140 to detectthe florescence. Sample stage 170 is moved relative to objective lens142 to position the next sample location on sample container 110 at thefocal point of the objective lens 142. Movement of sample stage 110relative to objective lens 142 can be achieved by moving the samplestage itself, the objective lens, some other component of the imagingsystem, or any combination of the foregoing. Further implementations mayalso include moving the entire imaging system over a stationary sample.

Fluid delivery module or device 100 directs the flow of reagents (e.g.,fluorescently labeled nucleotides, buffers, enzymes, cleavage reagents,etc.) to (and through) sample container 110 and waste valve 120. Samplecontainer 110 can include one or more substrates upon which the samplesare provided. For example, in the case of a system to analyze a largenumber of different nucleic acid sequences, sample container 110 caninclude one or more substrates on which nucleic acids to be sequencedare bound, attached or associated. In various implementations, thesubstrate can include any inert substrate or matrix to which nucleicacids can be attached, such as for example glass surfaces, plasticsurfaces, latex, dextran, polystyrene surfaces, polypropylene surfaces,polyacrylamide gels, gold surfaces, and silicon wafers. In someapplications, the substrate is within a channel or other area at aplurality of locations formed in a matrix or array across the samplecontainer 110.

In some implementations, the sample container 110 may include abiological sample that is imaged using one or more fluorescent dyes. Forexample, in a particular implementation the sample container 110 may beimplemented as a patterned flow cell including a translucent coverplate, a substrate, and a liquid sandwiched therebetween, and abiological sample may be located at an inside surface of the translucentcover plate or an inside surface of the substrate. The flow cell mayinclude a large number (e.g., thousands, millions, or billions) of wellsor regions that are patterned into a defined array (e.g., a hexagonalarray, rectangular array, etc.) into the substrate. Each region may forma cluster (e.g., a monoclonal cluster) of a biological sample such asDNA, RNA, or another genomic material which may be sequenced, forexample, using sequencing by synthesis. The flow cell may be furtherdivided into a number of spaced apart lanes (e.g., eight lanes), eachlane including a hexagonal array of clusters. Example flow cells thatmay be used in implementations disclosed herein are described in U.S.Pat. No. 8,778,848.

The system also comprises temperature station actuator 130 andheater/cooler 135 that can optionally regulate the temperature ofconditions of the fluids within the sample container 110. Camera system140 can be included to monitor and track the sequencing of samplecontainer 110. Camera system 140 can be implemented, for example, as acharge-coupled device (CCD) camera (e.g., a time delay integration (TDI)CCD camera), which can interact with various filters within filterswitching assembly 145, objective lens 142, and focusing laser/focusinglaser assembly 150. Camera system 140 is not limited to a CCD camera andother cameras and image sensor technologies can be used. In particularimplementations, the camera sensor may have a pixel size between about 5and about 15 μm.

Output data from the sensors of camera system 140 may be communicated toa real time analysis module (not shown) that may be implemented as asoftware application that analyzes the image data (e.g., image qualityscoring), reports or displays the characteristics of the laser beam(e.g., focus, shape, intensity, power, brightness, position) to agraphical user interface (GUI), and, as further described below,dynamically corrects distortion in the image data.

Light source 160 (e.g., an excitation laser within an assemblyoptionally comprising multiple lasers) or other light source can beincluded to illuminate fluorescent sequencing reactions within thesamples via illumination through a fiber optic interface (which canoptionally comprise one or more re-imaging lenses, a fiber opticmounting, etc.). Low watt lamp 165, focusing laser 150, and reversedichroic 185 are also presented in the example shown. In someimplementations focusing laser 150 may be turned off during imaging. Inother implementations, an alternative focus configuration can include asecond focusing camera (not shown), which can be a quadrant detector, aPosition Sensitive Detector (PSD), or similar detector to measure thelocation of the scattered beam reflected from the surface concurrentwith data collection.

Although illustrated as a backlit device, other examples may include alight from a laser or other light source that is directed through theobjective lens 142 onto the samples on sample container 110. Samplecontainer 110 can be ultimately mounted on a sample stage 170 to providemovement and alignment of the sample container 110 relative to theobjective lens 142. The sample stage can have one or more actuators toallow it to move in any of three dimensions. For example, in terms ofthe Cartesian coordinate system, actuators can be provided to allow thestage to move in the X, Y and Z directions relative to the objectivelens. This can allow one or more sample locations on sample container110 to be positioned in optical alignment with objective lens 142.

A focus (z-axis) component 175 is shown in this example as beingincluded to control positioning of the optical components relative tothe sample container 110 in the focus direction (typically referred toas the z axis, or z direction). Focus component 175 can include one ormore actuators physically coupled to the optical stage or the samplestage, or both, to move sample container 110 on sample stage 170relative to the optical components (e.g., the objective lens 142) toprovide proper focusing for the imaging operation. For example, theactuator may be physically coupled to the respective stage such as, forexample, by mechanical, magnetic, fluidic or other attachment or contactdirectly or indirectly to or with the stage. The one or more actuatorscan be configured to move the stage in the z-direction while maintainingthe sample stage in the same plane (e.g., maintaining a level orhorizontal attitude, perpendicular to the optical axis). The one or moreactuators can also be configured to tilt the stage. This can be done,for example, so that sample container 110 can be leveled dynamically toaccount for any slope in its surfaces.

Focusing of the system generally refers to aligning the focal plane ofthe objective lens with the sample to be imaged at the chosen samplelocation. However, focusing can also refer to adjustments to the systemto obtain a desired characteristic for a representation of the samplesuch as, for example, a desired level of sharpness or contrast for animage of a test sample. Because the usable depth of field of the focalplane of the objective lens may be small (sometimes on the order of 1 μmor less), focus component 175 closely follows the surface being imaged.Because the sample container is not perfectly flat as fixtured in theinstrument, focus component 175 may be set up to follow this profilewhile moving along in the scanning direction (herein referred to as they-axis).

The light emanating from a test sample at a sample location being imagedcan be directed to one or more detectors of camera system 140. Anaperture can be included and positioned to allow only light emanatingfrom the focus area to pass to the detector. The aperture can beincluded to improve image quality by filtering out components of thelight that emanate from areas that are outside of the focus area.Emission filters can be included in filter switching assembly 145, whichcan be selected to record a determined emission wavelength and to cutout any stray laser light.

Although not illustrated, a controller can be provided to control theoperation of the scanning system. The controller can be implemented tocontrol aspects of system operation such as, for example, focusing,stage movement, and imaging operations. In various implementations, thecontroller can be implemented using hardware, algorithms (e.g., machineexecutable instructions), or a combination of the foregoing. Forexample, in some implementations the controller can include one or moreCPUs or processors with associated memory. As another example, thecontroller can comprise hardware or other circuitry to control theoperation, such as a computer processor and a non-transitory computerreadable medium with machine-readable instructions stored thereon. Forexample, this circuitry can include one or more of the following: fieldprogrammable gate array (FPGA), application specific integrated circuit(ASIC), programmable logic device (PLD), complex programmable logicdevice (CPLD), a programmable logic array (PLA), programmable arraylogic (PAL) or other similar processing device or circuitry. As yetanother example, the controller can comprise a combination of thiscircuitry with one or more processors.

FIG. 2B is block diagram illustrating an example two-channel,line-scanning modular optical imaging system 200 that may be implementedin particular implementations. It should be noted that although systemsand methods may be described herein from time to time in the context ofexample imaging system 200, these are only examples with whichimplementations of the technology disclosed herein may be implemented.

In some implementations, system 200 may be used for the sequencing ofnucleic acids. Applicable techniques include those where nucleic acidsare attached at fixed locations in an array (e.g., the wells of a flowcell) and the array is imaged repeatedly. In such implementations,system 200 may obtain images in two different color channels, which maybe used to distinguish a particular nucleotide base type from another.More particularly, system 200 may implement a process referred to as“base calling,” which generally refers to a process of a determining abase call (e.g., adenine (A), cytosine (C), guanine (G), or thymine (T))for a given spot location of an image at an imaging cycle. Duringtwo-channel base calling, image data extracted from two images may beused to determine the presence of one of four base types by encodingbase identity as a combination of the intensities of the two images. Fora given spot or location in each of the two images, base identity may bedetermined based on whether the combination of signal identities is [on,on], [on, off], [off, on], or [off, off].

Referring again to imaging system 200, the system includes a linegeneration module (LGM) 210 with two light sources, 211 and 212,disposed therein. Light sources 211 and 212 may be coherent lightsources such as laser diodes which output laser beams. Light source 211may emit light in a first wavelength (e.g., a red color wavelength), andlight source 212 may emit light in a second wavelength (e.g., a greencolor wavelength). The light beams output from laser sources 211 and 212may be directed through a beam shaping lens or lenses 213. In someimplementations, a single light shaping lens may be used to shape thelight beams output from both light sources. In other implementations, aseparate beam shaping lens may be used for each light beam. In someexamples, the beam shaping lens is a Powell lens, such that the lightbeams are shaped into line patterns. The beam shaping lenses of LGM 210or other optical components imaging system be configured to shape thelight emitted by light sources 211 and 212 into a line patterns (e.g.,by using one or more Powel lenses, or other beam shaping lenses,diffractive or scattering components).

LGM 210 may further include mirror 214 and semi-reflective mirror 215configured to direct the light beams through a single interface port toan emission optics module (EOM) 230. The light beams may pass through ashutter element 216. EOM 230 may include objective 235 and a z-stage 236which moves objective 235 longitudinally closer to or further away froma target 250. For example, target 250 may include a liquid layer 252 anda translucent cover plate 251, and a biological sample may be located atan inside surface of the translucent cover plate as well an insidesurface of the substrate layer located below the liquid layer. Thez-stage may then move the objective as to focus the light beams ontoeither inside surface of the flow cell (e.g., focused on the biologicalsample). The biological sample may be DNA, RNA, proteins, or otherbiological materials responsive to optical sequencing as known in theart.

EOM 230 may include semi-reflective mirror 233 to reflect a focustracking light beam emitted from a focus tracking module (FTM) 240 ontotarget 250, and then to reflect light returned from target 250 back intoFTM 240. FTM 240 may include a focus tracking optical sensor to detectcharacteristics of the returned focus tracking light beam and generate afeedback signal to optimize focus of objective 235 on target 250.

EOM 230 may also include semi-reflective mirror 234 to direct lightthrough objective 235, while allowing light returned from target 250 topass through. In some implementations, EOM 230 may include a tube lens232. Light transmitted through tube lens 232 may pass through filterelement 231 and into camera module (CAM) 220. CAM 220 may include one ormore optical sensors 221 to detect light emitted from the biologicalsample in response to the incident light beams (e.g., fluorescence inresponse to red and green light received from light sources 211 and212).

Output data from the sensors of CAM 220 may be communicated to a realtime analysis module 225. Real time analysis module, in variousimplementations, executes computer readable instructions for analyzingthe image data (e.g., image quality scoring, base calling, etc.),reporting or displaying the characteristics of the beam (e.g., focus,shape, intensity, power, brightness, position) to a graphical userinterface (GUI), etc. These operations may be performed in real-timeduring imaging cycles to minimize downstream analysis time and providereal time feedback and troubleshooting during an imaging run. Inimplementations, real time analysis module may be a computing device(e.g., computing device 1000) that is communicatively coupled to andcontrols imaging system 200. In implementations further described below,real time analysis module 225 may additionally execute computer readableinstructions for correcting distortion in the output image data receivedfrom CAM 220.

FIG. 3 illustrates an example configuration of a patterned sample 300that may be imaged in accordance with implementations disclosed herein.In this example, sample 300 is patterned with a hexagonal array ofordered spots or features 310 that may be simultaneously imaged duringan imaging run. Although a hexagonal array is illustrated in thisexample, in other implementations the sample may be patterned using arectilinear array, a circular array, an octagonal array, or some otherarray pattern. For ease of illustration, sample 300 is illustrated ashaving tens to hundreds of spots 310. However, as would be appreciatedby one having skill in the art, sample 300 may have thousands, millions,or billions of spots 310 that are imaged. Moreover, in some instances,sample 300 may be a multi-plane sample comprising multiple planes(perpendicular to focusing direction) of spots 310 that are sampledduring an imaging run.

In a particular implementation, sample 300 may be a flow cell patternedwith millions or billions of wells that are divided into lanes. In thisparticular implementation, each well of the flow cell may containbiological material that is sequenced using sequencing by synthesis.

As discussed above, optical distortion may be particularly detrimentalfor multi-cycle imaging of a patterned sample 300 having a large numberof spots, as it may shift the actual position of spots of the scannedimage away from the expected position of the spots. This distortioneffect may become particularly pronounced along the edges of the fieldof view, potentially rendering unusable the imaged data from thesespots. This may cause a drop in data throughput and an increase in errorrate during a multi-cycle imaging run. Implementations described beloware directed to dynamically correcting image distortion during animaging run (e.g., a sequencing run), thereby improving data throughputand reducing the error rate during the imaging run.

FIG. 4 is an operational flow diagram illustrating an example method 400that may be implemented for dynamically correcting image distortionduring an imaging run in accordance with the disclosure. Although method400 will from time to time be described in the context of a two channelimaging system (e.g., imaging system 200), method 400 may be applied toan imaging system having any number of channels (e.g., one channel,three channels, four channels, etc.)

At operation 410, a calibrating imaging cycle of a patterned sampled isperformed. During the calibrating imaging cycle, image data may becollected for the entire sample by scanning the sample area (e.g., usinga line scanner), with one or more coherent sources of light. By way ofexample, imaging system 200 may use LGM 210 in coordination with theoptics of the system to line scan the sample with light havingwavelengths within the red color spectrum and to line scan the samplewith light having wavelengths within the green color spectrum. Inresponse to line scanning, fluorescent dyes situated at the differentspots of the sample may fluoresce and the resultant light may becollected by the objective lens 235 and directed to an image sensor ofCAM 220 to detect the florescence. For example, fluorescence of eachspot may be detected by a few pixels of CAM 220. Image data output fromCAM 220 may then be communicated to real time analysis module 225 forimage distortion correction (e.g., correction of image distortionresulting from the geometry of objective lens 235).

In various implementations, the calibrating imaging cycle may be thevery first imaging cycle of a multi-cycle imaging run (e.g., a DNAsequencing run). Particularly, the imaging system may automaticallydetermine distortion correction coefficients during the beginning ofevery imaging run, thereby preventing distortion drift of the imagingsystem over time.

At operation 430, the imaging data generated by the calibrating imagingcycle is divided into a plurality of imaging data subsets (e.g., tiles)corresponding to a respective region of the patterned sample. In otherwords, an imaging data subset comprises a subset of the pixels of animaging data set of one imaging cycle. FIG. 5 visually illustrates howthe imaging data may be divided into a plurality of imaging data subsetsfor an N-channel imaging system that images a sample having an array ofspots (e.g., sample 300). For simplicity, image distortion is notillustrated by FIG. 5 . As shown, for each channel the image data may besubdivided into a plurality of tiles 445 or imaging data subsetscorresponding to a region of the sample. Each imaging data subset itselfcomprises plurality of image spots 443 that may be distorted from theirexpected positions on the sample (particularly along the edges of thetile). By way of example, an imaging data subset for a 2-channel imagermay include the image data for a respective region of the sample foreach channel (e.g., the top right tile of channel 1 and the top righttile of channel 2). As illustrated by FIG. 5 , the imaging data isdivided into 28 tiles for each color channel. Dividing the image datainto a plurality of tiles 445 permits parallelization of imageprocessing operations. Additionally, as further described below, thispermits independent distortion correction for each region of the sample,which may correct additional distortions (i.e., distortion that is notdue to optics) that are localized on the sample. Such distortions may beintroduced by tilt of the flow cell or tilt induced by 3D curvature ofthe flow cell such as a bathtub shape.

In various implementations, the size of the imaging data subsets may bedetermined using the placement of fiducial markers or fiducials in thefield of view of the imaging system, in the sample, or on the sample.The imaging data subsets may be divided such that the pixels of eachimaging data subset or tile has a predetermined number of fiducials(e.g., at least three fiducials, four fiducials, six fiducials, eightfiducials, etc.) For example, the total number of pixels of the imagingdata subset may be predetermined based on predetermined pixel distancesbetween the boundaries of the imaging data subset and the fiducials.FIG. 7 illustrates one such example of a tile 500 including sixfiducials 510. As further described below, these fiducials may be usedas reference points for aligning the image and determining distortioncoefficients.

At operation 450, of which a particular implementation is furtherdescribed below, a set of image distortion correction coefficients isindependently calculated for each imaging data subset. In the event thatthe imaging data subset includes multiple color channels, a separate setof distortion correction coefficients may be calculated for each colorchannel. These image distortion correction coefficients may be appliedto correct distortion of image data in the calibrating imaging cycle.

At operation 470, the next imaging cycle of the patterned sample isperformed, and new image data is generated. At operation 490, thedistortion correction coefficients calculated during the calibratingimaging cycle are applied to the imaging data of the current imagingcycle to correct for distortion. Each set of calculated distortioncoefficients may be applied to a corresponding tile in the currentcycle's imaging data. Thereafter, operations 470 and 490 may beiterated. As such, distortion correction coefficients calculated duringan initial imaging cycle may be applied to subsequent imaging cycles toindependently correct for distortion in the different tiles of imagingdata.

FIG. 6 is an operational flow diagram illustrating an example method 450of calculating distortion correction coefficients for imaging datagenerated by an imaging system. It should be noted that although examplemethod 450 is illustrated as being applied to an imaging data subset445, in practice it may be applied to a full imaging data set (e.g.,image data of an entire sample).

Method 450 takes as an input an imaging data subset 445 corresponding toa region of a sample that was generated during an imaging cycle andoutputs a set of distortion correction coefficients 468 for a polynomialthat may be applied to correct distortion of i) the imaging data subset;and ii) imaging data of the same region of the sample taken duringsubsequent imaging cycles. In instances where the imaging data subsetcomprises imaging data for a first color channel and imaging data for asecond color channel, a set of distortion correction coefficients may begenerated for each channel of the imaging data subset. Althoughimplementations of method 450 will primarily be described with referenceto determine distortion correction coefficients for two-channel imagingdata, it should be noted that method 450 may be applied to determinedistortion correction coefficients for imaging data corresponding to anynumber of channels. It should also be noted that in multi-channelimaging systems, operations 451-452 and 461-465 may be performedindependently for imaging data corresponding to each channel. As such,for the sake of simplicity, these operations will primarily be describedas if they were performed for a single channel. For additionalsimplicity, the description of method 450 will refer to imaging datasubset 445 as an image.

At operation 451, an affine transform is estimated for the image usingimage fiducials. For example, as illustrated in FIG. 7 , bullseye ringfiducials 510 (light rings surrounded by a dark border to enhancecontrast) may be found in the image to determine their actual locationsin the image. In implementations, the locations of the fiducials in theimage may be found by performing cross-correlation with the location ofa reference virtual fiducial and taking the location where thecross-correlation score is maximized. Cross-correlation may be performedusing the cross-correlation equation for discrete functions, Equation(1)

$\begin{matrix}{{{( {f*g} )\lbrack n\rbrack}\overset{def}{=}{\sum\limits_{m = {- \infty}}^{\infty}{f*\lbrack m\rbrack{g\lbrack {m + n} \rbrack}}}},} & (1)\end{matrix}$where a measure of the goodness of a fit between a fiducial in the imageand a virtual fiducial may be calculated using scoring equation (2):Score=1−(RunnerUp_CC−Minimum_CC)/(Maximum_CC−Minimum_CC),  (2)where Minimum_CC is the minimum value of the cross-correlation,Maximum_CC is the maximum value of the cross-correlation, andRunnerUp_CC is the largest cross correlation value outside a radius of 4pixels from the location of the Maximum_CC. Particular methods fordetermining the locations of fiducials are described in greater detailin U.S. patent application Ser. No. 14/530,299.

Given prior knowledge of the theoretical location of the fiducials(e.g., based on how many equally spaced spots there should be betweenthe fiducials), an affine transform that maps the theoretical locationsof the fiducials to their actual locations on the image may bedetermined. The estimated affine transform may map the translation,rotation, and magnification from the expected position of the fiducials.

Given theoretical locations x_(i), y_(i) of an image (i.e., where pixelsof fiducials should be using the actual sample configuration) and actualimage locations x_(w), y_(w) (where pixels of fiducials actually appearon image), the affine transform may mathematically be represented byEquation (3):

$\begin{matrix}{{\begin{bmatrix}x_{w} \\y_{w} \\1\end{bmatrix} = {{{\begin{bmatrix}1 & 0 & x_{0} \\0 & 1 & y_{0} \\0 & 0 & 1\end{bmatrix}\begin{bmatrix}s_{x} & 0 & 0 \\0 & s_{y} & 0 \\0 & 0 & 1\end{bmatrix}}\begin{bmatrix}{\cos\theta} & {{- \sin}\theta} & 0 \\{\sin\theta} & {\cos\theta} & 0 \\0 & 0 & 1\end{bmatrix}}\begin{bmatrix}x_{i} \\y_{i} \\1\end{bmatrix}}},} & (3)\end{matrix}$

where the first matrix is a translation matrix, the second matrix is ascaling matrix that scales an image point by scaling factor s_(x) in thex direction and a scaling factor s_(y) in the y direction, and the thirdmatrix is a rotation matrix that rotates an image point by an angle θabout the z axis (i.e., in the focusing direction perpendicular to theimage). Alternatively, the affine transform may be represented byEquation (4):

$\begin{matrix}{{\begin{bmatrix}x_{w} \\y_{w} \\1\end{bmatrix} = {\begin{bmatrix}a_{11} & a_{12} & a_{13} \\a_{21} & a_{22} & a_{23} \\0 & 0 & 1\end{bmatrix}\begin{bmatrix}x_{i} \\y_{i} \\1\end{bmatrix}}},} & (4)\end{matrix}$where the a₁₁ and a₂₃ coefficients provide for translation of an imagepoint along the x and y directions, and the other four coefficientsprovide for a combination of scaling and magnification of an imagepoint. Given the actual locations (u₁, v₁), (u₂, v₂), (u₃, v₃) of threefiducials on the image, and the theoretical locations (x₁, y₁), (x₂,y₂), (x₃, y₃) of the three fiducials, the affine transform may beestimated by solving Equation (5):

$\begin{matrix}{\begin{bmatrix}u_{1} & u_{2} & u_{3} \\v_{1} & v_{2} & v_{3} \\1 & 1 & 1\end{bmatrix} = {{\begin{bmatrix}a_{11} & a_{12} & a_{13} \\a_{21} & a_{22} & a_{23} \\0 & 0 & 1\end{bmatrix}\begin{bmatrix}x_{1} & x_{2} & x_{3} \\y_{1} & y_{2} & y_{3} \\1 & 1 & 1\end{bmatrix}}.}} & (5)\end{matrix}$

Equation (5) may be solved by solving least squares Equation (6):

$\begin{matrix}{{\varepsilon( {a_{11},a_{12},a_{13},a_{21},a_{22},a_{23}} )} = {\sum\limits_{j = 1}^{n}( {( {{{a_{11}x_{j}} + {a_{12}y_{j}} + a_{13} - u_{j}},} )^{2} + ( {{a_{21}x_{j}} + {a_{22}y_{j}} + a_{23} - v_{j}} )^{2}} )}} & (6)\end{matrix}$

Taking the six partial derivatives of the error function with respect toeach of the six variables and setting this expression to zero gives sixequations representation in matrix form by Equation (7):

$\begin{matrix}{{\begin{bmatrix}{\sum x_{j}^{2}} & {\sum{x_{j}y_{j}}} & {\sum x_{j}} & 0 & 0 & 0 \\{\sum{x_{j}y_{j}}} & {\sum y_{j}^{2}} & {\sum y_{j}} & 0 & 0 & 0 \\{\sum x_{j}} & {\sum y_{j}} & {\sum 1} & 0 & 0 & 0 \\0 & 0 & 0 & {\sum x_{j}^{2}} & {\sum{x_{j}y_{j}}} & {\sum x_{j}} \\0 & 0 & 0 & {\sum{x_{j}y_{j}}} & {\sum y_{j}^{2}} & {\sum y_{j}} \\0 & 0 & 0 & {\sum x_{j}} & {\sum y_{j}} & {\sum 1}\end{bmatrix}\begin{bmatrix}a_{11} \\a_{12} \\a_{13} \\a_{21} \\a_{22} \\a_{23}\end{bmatrix}} = {{\begin{bmatrix}{\sum{u_{j}x_{j}}} \\{\sum{u_{j}y_{j}}} \\{\sum u_{j}} \\{\sum{v_{j}x_{j}}} \\{\sum{v_{j}y_{j}}} \\{\sum v_{j}}\end{bmatrix}.}}} & (7)\end{matrix}$

At operation 452, the image is sharpened. For example, the image may besharpened using the Laplacian convolution or other image sharpeningtechniques known in the art.

At operation 460, an iterative search for distortion correctioncoefficients that maximize mean chastity of a plurality of spots in theimage is run. In various implementations, the search may be a patternedsearch. Alternatively, other suitable search algorithms known in the artmay be applied. The steps of search operation 460 are further describedbelow.

In certain implementations, the search algorithm can be accelerated bysubsampling spots within the image. In particular two-channelimplementations of these implementations, the subsampling must includeevery spot in some number of rows. Doing so may address a problem thatis unique to two-channel (two-color) encoding of signals having [off,off] signal intensities (e.g., base calls). In the case of base calls,G-base clusters, which are designated as “off” (unlabeled) clusters, mayincorrectly be registered as “on.” Alternatively, a signal may beextracted from the space between clusters (i.e., area between wells) andregistered as an “off” signal. This problem is overcome by samplingevery well in a row and a sufficient number of rows such that G-baseclusters do not drive the chastity cost function.

At operation 461, a set of distortion correction coefficients isgenerated. The distortion correction coefficients may provide apolynomial representation of the distortion correction function of theimage. In implementations, the distortion correct coefficients maycorrespond to a second order polynomial, a third order polynomial, afourth order polynomial, or fifth order polynomial, or an even higherorder polynomial. In implementations where the imaging system is a linescanner, distortion correction may mathematically be represented byEquation (8):({circumflex over (x)},ŷ)=(x,y)+(dx,dy)dx=a _(n)(x−c _(x))^(n) + . . . a ₂(x−c _(x))² +a ₁(x−c _(x))+ddy=a _(n)(x−c _(x))^(n) + . . . a ₂(x−c _(x))² +a ₁(x−c _(x))+d,  (8)where ({circumflex over (x)}, ŷ) is the distortion corrected positionwithin the image of image coordinates (x, y), a₁ . . . a_(n) aredistortion correction coefficients describing an nth order polynomial,and c_(x) is the center point in the image for x, and where y is thedirection of scanning for the line scanner. In this implementation,distortion in y can be measured with respect to x, because that is thedimension with greatest distortion. In some instances, where distortionin y is negligible (e.g., as determined by imaging requirements), it maybe assumed that dy=0 and the distortion correction position within theimage simplifies to Equation (9):({circumflex over (x)},ŷ)=(x,y)+(dx,0).  (9)

In implementations, search operation 460 may start off with 0 values forthe distortion correction coefficients during the first step of thesearch (i.e., assume no distortion in the image). Alternatively, apreviously learned set of coefficients values may be used to start thesearch.

At operation 462, the affine transform estimated at operation 451 isapplied to spot locations in the image. For example, the affinetransform may be applied in accordance with Equation (4) describedabove.

At operation 463, after applying the estimated affine transform to thespot locations, the generated distortion correction coefficients areapplied to the spot locations in the image. For example, wheredistortion is corrected in two dimensions for a line scanner, Equation(8) may be applied. Alternatively, if distortion in y is negligible,Equation (9) may be applied.

At operation 464, signal intensities are extracted for each spotlocation in the image. For example, for a given spot location, signalintensity may be extracted by determining a weighted average of theintensity of the pixels in a spot location. For example, a weightedaverage of the center pixel and neighboring pixels may be performed suchas bilinear interpolation. In implementations, each spot location in theimage may comprise a few pixels (e.g., 1-5 pixels).

At optional operation 465, the extracted signal intensities arespatially normalized to account for variation in illumination across thesampled imaged. For example, intensity values may be normalized suchthat a 5th and 95th percentiles have values of 0 and 1, respectively.

At operation 466, the normalized signal intensities for the image (e.g.,normalized intensities for each channel) may be used to calculate meanchastity for the plurality of spots in the image. Example methods forcalculating mean chastity are further described below.

In one implementation, mean chastity may be calculated for a two-channelsystem that implements base calling, which, as described above,generally refers to a process of determining a base call (e.g., A, C, G,or T) for a given spot location of an image during an imaging cycle.Base calling may be performed by fitting a mathematical model to theintensity data. Suitable mathematical models that can be used include,for example, a k-means clustering algorithm, a k-means-like clusteringalgorithm, expectation maximization clustering algorithm, a histogrambased method, and the like. Four Gaussian distributions may be fit tothe set of two-channel intensity data such that one distribution isapplied for each of the four nucleotides represented in the data set.

In one particular implementation, an expectation maximization (EM)algorithm may be applied. As a result of the EM algorithm, for each X, Yvalue (referring to each of the two channel intensities respectively) avalue can be generated which represents the likelihood that a certain X,Y intensity value belongs to one of four Gaussian distributions to whichthe data is fitted. Where four bases give four separate distributions,each X, Y intensity value will also have four associated likelihoodvalues, one for each of the four bases. The maximum of the fourlikelihood values indicates the base call. This is illustrated by FIG. 8, which shows that if a cluster is “off” in both channels, the basecallis G. If the cluster is “off” in one channel and “on” in another channelthe base call is either C or T (depending on which channel is on), andif the cluster is “on” in both channels the basecall is A.

More generally, for base calling implementations involving any number ofchannels, chastity for a given image spot may be determined using atleast the distance of the channel's intensity point to the center of itsrespective Gaussian distribution. The closer the image spot's intensitypoint lies in the center of the distribution for the called base, thegreater the likelihood the called base is accurate and the higher itschastity value. In four-channel implementations, the quality of the basecall (i.e., chastity value) for the given spot may be expressed as thehighest intensity value divided by the highest plus the second highest.In two-channel implementations, the quality or purity of the base callfor a given data point can be expressed as a function of the distance tothe nearest centroid divided by the distance to the second nearestcentroid. Mathematically, chastity for a given point for two-channelimplementations may be expressed by Equation (10):C=1.0−D1/(D1+D2),  (10)where D1 is the distance to the nearest Gaussian mean, and D2 is thenext closest distance to a Guassian mean. Distance may be measured usingthe Mahalanobis method (which takes into account the width of thedistribution along the line defined by each Gaussian centroid and thepoint under consideration.)

At decision 468, it is determined whether search 460 should iterate.This determination, in various implementations, may depend on whetherthe mean chastity determination has converged on an optimal set ofdistortion correction coefficients, search 460 has iterated apredetermined number of times, a predetermined mean chastity value hasbeen calculated, or some combination thereof. For example, if a set ofcoefficients improve overall mean chastity, those coefficients maybecome a starting point for the next iteration of the search andsampling of a new set of coefficients. In particular implementations,search 460 may iterate tens, hundreds, or even thousands of times (e.g.,using a patterned search).

FIGS. 9A-9B each respectively illustrates a collection of distortioncurves for a set of tiles for optics that happen to be on a two-channelsequencing instrument that uses flow cells. FIG. 9A is from oneinstrument and FIG. 9B from another instrument showing the variabilityfrom instrument to instrument. The curves are done both by surface(first number) and by lane (second number). As the plots illustrate,distortion may vary both by lane and by surface of the flow cell. FIG.9C illustrates four distortion curves corresponding to two differentcolor channels fora single of tile for optics that happen to be on afour-channel sequencing instrument that uses flow cells. As such,independent correction of image distortion in the different of regionsof flow cell (both by region and color channel) in accordance with theimplementations disclosed herein may further improve image quality.

FIG. 10A is a box and whiskers plot of experimental results illustratingwhat percent of spots of a flow cell sequenced using a line scannerpassed a chastity filter (% PF) without distortion correction, binnedacross the field of view of a tile with respect to X. Chastity filteringmay be applied during imaging cycles to filter out data from “poor imagequality” spots. For example, a spot may be disregarded as a data pointif it does not exceed a predetermined chastity value after a certainnumber of sequencing cycles. In FIG. 10A, the subtile bin numberindicates the distance in the x direction of the spots relative to thecenter of a tile image. For a given x direction, results were averagedover all ys (where y was the scanning direction) of the tile. As shown,without distortion correction, a small percentage of spots at the edgesof tiles passed the chastity filter, and the data for those spots becomeunusable. FIG. 10B is a box plot of experimental results showing whatpercent of spots of a sequenced flow cell passed a chastity filter withdistortion correction in accordance with the present disclosure. Asillustrated, the number of spots passing the chastity filterdramatically significantly improved toward the edges of tiles.

In further implementations, optical distortion may be reduced in animaging system by optimizing the optical design of an imaging lens(e.g., an objective lens) in the imaging system. The design of theoptical lens may be optimized by tailoring it using at least apredetermined image distortion correction algorithm applied to imagestaken by the lens (e.g., the image distortion correction algorithmdescribed herein). For example, if the image distortion correctionalgorithm expects 0.2 to 0.4 pixels of distortion in the lens, it may beadvantageous to design the lens with the expected level of distortion asopposed to no distortion.

FIG. 11 is an operational flow diagram illustrating an example method600 for determining optical distortion correction parameters that may beused to optimize a design of an imaging lens (e.g., an objective lens).Method 600 receives as inputs the field of view of the lens and pixelsize of the image sensor and outputs the maximum absolute opticaldistortion and maximum error from the fitted position of a fifth orderpolynomial.

At operation 610, a vector of point spread function centroids iscalculated. The vector of point spread functions may be calculated byinitializing a maximum distortion (DistMax) variable to zero anditerating the following steps while Dist>DistMax:

calculating the paraxial Y height at the field height F (Yref);

calculating the centroid of the Huygens point spread function (Yreal);

calculating the distortion: Dist=100*ABSO(Yreal-Yref)/Yref; and

storing Yreal in a vector (Vyreal), and storing F in a vector (VF).

At operation 620, a polynomial fit of the point spread functions iscalculated. This polynomial fit, in particular implementations, may becalculated by calculating a fifth order polynomial fit of VF and Vyrealof the form: Vyreal=a1*F+a3*F{circumflex over ( )}3+a5*F{circumflex over( )}5, where a1 represents magnification, a3, is a third ordercoefficient, and a5 is a fifth order coefficient.

At operation 630, each centroid may be compared with the fittedposition. This comparison may be made by initializing a maximum errorfrom fitted position (ErrMax) variable to zero and iterating thefollowing steps while Err>ErrMax:

-   -   calculating the paraxial Y height of the field height F (Yref);    -   calculating the centroid of the Huygens point spread function        (Yreal);    -   calculating the expected centroid location from a1, a3, and a5        (Yexp); and    -   calculating the error Err=abs(Yexp−Yreal)/Spix where Spix is the        pixel size of the image sensor.

In this example, at operation 640 the design of the lens is optimizedusing at least the determined maximum error from the fitted position andthe determined maximum absolute distortion. In implementations thisoptimization may be based on a least squares minimization technique thatroot sum squares (rss) the determined maximum error and determinedmaximum absolute distortion with wavefront error.

FIG. 12 is a residual distortion plot showing residual opticaldistortion in pixels across the field of view of a lens after applying afifth order polynomial to correct for distortion.

FIG. 13 illustrates an example computing component that may be used toimplement various features of the system and methods disclosed herein,such as the aforementioned features and functionality of one or moreaspects of methods 400 and 450. For example, computing component may beimplemented as a real-time analysis module 225.

As used herein, the term module might describe a given unit offunctionality that can be performed in accordance with one or moreimplementations of the present application. As used herein, a modulemight be implemented utilizing any form of hardware, software, or acombination thereof. For example, one or more processors, controllers,ASICs, PLAs, PALs, CPLDs, FPGAs, logical components, software routinesor other mechanisms might be implemented to make up a module. Inimplementation, the various modules described herein might beimplemented as discrete modules or the functions and features describedcan be shared in part or in total among one or more modules. In otherwords, as would be apparent to one of ordinary skill in the art afterreading this description, the various features and functionalitydescribed herein may be implemented in any given application and can beimplemented in one or more separate or shared modules in variouscombinations and permutations. Even though various features or elementsof functionality may be individually described or claimed as separatemodules, one of ordinary skill in the art will understand that thesefeatures and functionality can be shared among one or more commonsoftware and hardware elements, and such description shall not requireor imply that separate hardware or software components are used toimplement such features or functionality.

Where components or modules of the application are implemented in wholeor in part using software, in one implementation, these softwareelements can be implemented to operate with a computing or processingmodule capable of carrying out the functionality described with respectthereto. One such example computing module is shown in FIG. 13 . Variousimplementations are described in terms of this example-computing module1000. After reading this description, it will become apparent to aperson skilled in the relevant art how to implement the applicationusing other computing modules or architectures.

Referring now to FIG. 13 , computing module 1000 may represent, forexample, computing or processing capabilities found within desktop,laptop, notebook, and tablet computers; hand-held computing devices(tablets, PDA's, smart phones, cell phones, palmtops, etc.); mainframes,supercomputers, workstations or servers; or any other type ofspecial-purpose or general-purpose computing devices as may be desirableor appropriate for a given application or environment. Computing module1000 might also represent computing capabilities embedded within orotherwise available to a given device. For example, a computing modulemight be found in other electronic devices such as, for example, digitalcameras, navigation systems, cellular telephones, portable computingdevices, modems, routers, WAPs, terminals and other electronic devicesthat might include some form of processing capability.

Computing module 1000 might include, for example, one or moreprocessors, controllers, control modules, or other processing devices,such as a processor 1004. Processor 1004 might be implemented using ageneral-purpose or special-purpose processing engine such as, forexample, a microprocessor, controller, or other control logic. In theillustrated example, processor 1004 is connected to a bus 1002, althoughany communication medium can be used to facilitate interaction withother components of computing module 1000 or to communicate externally.

Computing module 1000 might also include one or more memory modules,simply referred to herein as main memory 1008. For example, preferablyrandom access memory (RAM) or other dynamic memory, might be used forstoring information and instructions to be executed by processor 1004.Main memory 1008 might also be used for storing temporary variables orother intermediate information during execution of instructions to beexecuted by processor 1004. Computing module 1000 might likewise includea read only memory (“ROM”) or other static storage device coupled to bus1002 for storing static information and instructions for processor 1004.

The computing module 1000 might also include one or more various formsof information storage mechanism 1010, which might include, for example,a media drive 1012 and a storage unit interface 1020. The media drive1012 might include a drive or other mechanism to support fixed orremovable storage media 1014. For example, a hard disk drive, a solidstate drive, a magnetic tape drive, an optical disk drive, a CD or DVDdrive (R or RW), or other removable or fixed media drive might beprovided. Accordingly, storage media 1014 might include, for example, ahard disk, a solid state drive, magnetic tape, cartridge, optical disk,a CD, DVD, or Blu-ray, or other fixed or removable medium that is readby, written to or accessed by media drive 1012. As these examplesillustrate, the storage media 1014 can include a computer usable storagemedium having stored therein computer software or data.

In alternative implementations, information storage mechanism 1010 mightinclude other similar instrumentalities for allowing computer programsor other instructions or data to be loaded into computing module 1000.Such instrumentalities might include, for example, a fixed or removablestorage unit 1022 and an interface 1020. Examples of such storage units1022 and interfaces 1020 can include a program cartridge and cartridgeinterface, a removable memory (for example, a flash memory or otherremovable memory module) and memory slot, a PCMCIA slot and card, andother fixed or removable storage units 1022 and interfaces 1020 thatallow software and data to be transferred from the storage unit 1022 tocomputing module 1000.

Computing module 1000 might also include a communications interface1024. Communications interface 1024 might be used to allow software anddata to be transferred between computing module 1000 and externaldevices. Examples of communications interface 1024 might include a modemor softmodem, a network interface (such as an Ethernet, networkinterface card, WiMedia, IEEE 802.XX or other interface), acommunications port (such as for example, a USB port, IR port, RS232port Bluetooth® interface, or other port), or other communicationsinterface. Software and data transferred via communications interface1024 might typically be carried on signals, which can be electronic,electromagnetic (which includes optical) or other signals capable ofbeing exchanged by a given communications interface 1024. These signalsmight be provided to communications interface 1024 via a channel 1028.This channel 1028 might carry signals and might be implemented using awired or wireless communication medium. Some examples of a channel mightinclude a phone line, a cellular link, an RF link, an optical link, anetwork interface, a local or wide area network, and other wired orwireless communications channels.

In this document, the terms “computer readable medium”, “computer usablemedium” and “computer program medium” are used to generally refer tonon-transitory media, volatile or non-volatile, such as, for example,memory 1008, storage unit 1022, and media 1014. These and other variousforms of computer program media or computer usable media may be involvedin carrying one or more sequences of one or more instructions to aprocessing device for execution. Such instructions embodied on themedium, are generally referred to as “computer program code” or a“computer program product” (which may be grouped in the form of computerprograms or other groupings). When executed, such instructions mightenable the computing module 1000 to perform features or functions of thepresent application as discussed herein.

Although described above in terms of various exemplary implementationsand implementations, it should be understood that the various features,aspects and functionality described in one or more of the individualimplementations are not limited in their applicability to the particularimplementation with which they are described, but instead can beapplied, alone or in various combinations, to one or more of the otherimplementations of the application, whether or not such implementationsare described and whether or not such features are presented as being apart of a described implementation. Thus, the breadth and scope of thepresent application should not be limited by any of the above-describedexemplary implementations.

It should be appreciated that all combinations of the foregoing concepts(provided such concepts are not mutually inconsistent) are contemplatedas being part of the inventive subject matter disclosed herein. Inparticular, all combinations of claimed subject matter appearing at theend of this disclosure are contemplated as being part of the inventivesubject matter disclosed herein.

The terms “substantially” and “about” used throughout this disclosure,including the claims, are used to describe and account for smallfluctuations, such as due to variations in processing. For example, theycan refer to less than or equal to ±5%, such as less than or equal to±2%, such as less than or equal to ±1%, such as less than or equal to±0.5%, such as less than or equal to ±0.2%, such as less than or equalto ±0.1%, such as less than or equal to ±0.05%.

To the extent applicable, the terms “first,” “second,” “third,” etc.herein are merely employed to show the respective objects described bythese terms as separate entities and are not meant to connote a sense ofchronological order, unless stated explicitly otherwise herein.

Terms and phrases used in this document, and variations thereof, unlessotherwise expressly stated, should be construed as open ended as opposedto limiting. As examples of the foregoing: the term “including” shouldbe read as meaning “including, without limitation” or the like; the term“example” is used to provide exemplary instances of the item indiscussion, not an exhaustive or limiting list thereof; the terms “a” or“an” should be read as meaning “at least one,” “one or more” or thelike; and adjectives such as “conventional,” “traditional,” “normal,”“standard,” “known” and terms of similar meaning should not be construedas limiting the item described to a given time period or to an itemavailable as of a given time, but instead should be read to encompassconventional, traditional, normal, or standard technologies that may beavailable or known now or at any time in the future. Likewise, wherethis document refers to technologies that would be apparent or known toone of ordinary skill in the art, such technologies encompass thoseapparent or known to the skilled artisan now or at any time in thefuture.

The presence of broadening words and phrases such as “one or more,” “atleast,” “but not limited to” or other like phrases in some instancesshall not be read to mean that the narrower case is intended or requiredin instances where such broadening phrases may be absent. The use of theterm “module” does not imply that the components or functionalitydescribed or claimed as part of the module are all configured in acommon package. Indeed, any or all of the various components of amodule, whether control logic or other components, can be combined in asingle package or separately maintained and can further be distributedin multiple groupings or packages or across multiple locations.

Additionally, the various implementations set forth herein are describedin terms of exemplary block diagrams, flow charts and otherillustrations. As will become apparent to one of ordinary skill in theart after reading this document, the illustrated implementations andtheir various alternatives can be implemented without confinement to theillustrated examples. For example, block diagrams and their accompanyingdescription should not be construed as mandating a particulararchitecture or configuration.

While various implementations of the present disclosure have beendescribed above, it should be understood that they have been presentedby way of example only, and not of limitation. Likewise, the variousdiagrams may depict an example architectural or other configuration forthe disclosure, which is done to aid in understanding the features andfunctionality that can be included in the disclosure. The disclosure isnot restricted to the illustrated example architectures orconfigurations, but the desired features can be implemented using avariety of alternative architectures and configurations. Indeed, it willbe apparent to one of skill in the art how alternative functional,logical or physical partitioning and configurations can be implementedto implement the desired features of the present disclosure. Also, amultitude of different constituent module names other than thosedepicted herein can be applied to the various partitions. Additionally,with regard to flow diagrams, operational descriptions and methodclaims, the order in which the steps are presented herein shall notmandate that various implementations be implemented to perform therecited functionality in the same order unless the context dictatesotherwise.

What is claimed is:
 1. A method for sequencing comprising: performing acalibrating imaging cycle on a substrate to which a plurality of spotsare bound, each spot comprising one or more molecules of a targetnucleic acid, the calibrating imaging cycle comprising: contacting theone or more samples with a first detectable element; imaging a portionof the substrate with an imaging system to detect one or more opticalsignals using, at least in part, the first detectable element;contacting the one or more samples with a second detectable element; andimaging the portion of the substrate with the imaging system to detectone or more optical signals using, at least in part, the seconddetectable element, wherein the first detectable element is a firstfluorescently tagged nucleic acid, wherein the second detectable elementis a second fluorescently tagged nucleic acid, wherein the firstfluorescently tagged nucleic acid and the second fluorescently taggednucleic acid are different; extracting a signal intensity for each spotfrom the one or more optical signals for each imaged portion of thesubstrate of the calibrating imaging cycle to determine a relativelocation of the plurality of spots; and sequencing the one or moresamples attached the substrate using a plurality of detectable labelsusing the relative location of the plurality of spots.
 2. The method ofclaim 1, wherein the first detectable element is a fluorescently taggednucleic acid.
 3. The method of claim 1, wherein each spot is less than 5pixels in size.
 4. The method of claim 1, wherein each spot is between 1pixel and 5 pixels in size.
 5. The method of claim 1, wherein therelative location of the plurality of spots is determined based upon aGaussian distribution.
 6. The method of claim 1, wherein the relativelocation of the plurality of spots is determined based upon a pointspread function.
 7. The method of claim 1 wherein the firstfluorescently tagged nucleic acid emits light for a first color channeland the second fluorescently tagged nucleic acid emits light for asecond color channel.
 8. The method of claim 1, wherein the calibratingimaging cycle further comprises sub-dividing the imaged portion of thesubstrate into a plurality of tiles.
 9. The method of claim 8, furthercomprising determining correction coefficients for each of the pluralityof tiles, wherein the sequencing of the one or more samples furthercomprising applying the correction coefficients to each of the pluralityof tiles.
 10. The method of claim 9, wherein the one or more correctioncoefficients are iteratively determined.
 11. A system for sequencingcomprising: an imaging system to image one or more portions of asubstrate; and a processing system configured to: initiate a calibratingimaging cycle for the imaging system to detect one or more opticalsignals emitted from a detectable element of a plurality of spotsbounded to a substrate, each spot comprising one or more molecules of atarget nucleic acid, wherein the first calibrating imaging cyclecomprises: contacting the one or more samples with a first detectableelement; imaging a portion of the substrate with the imaging system todetect one or more optical signals using, at least in part, the firstdetectable element; contacting the one or more samples with a seconddetectable element; and imaging the portion of the substrate with theimaging system to detect one or more optical signals using, at least inpart, the second detectable element, wherein the first detectableelement is a first fluorescently tagged nucleic acid, wherein the seconddetectable element is a second fluorescently tagged nucleic acid,wherein the first fluorescently tagged nucleic acid and the secondfluorescently tagged nucleic acid are different; and extract a signalintensity for each spot from the one or more optical signals for theimaged portion of the substrate of the first imaging cycle to determinea relative location of the plurality of spots.
 12. The system of claim11, wherein the detectable element is a fluorescently tagged nucleicacid.
 13. The system of claim 11, wherein each spot is less than 5pixels in size.
 14. The system of claim 11, wherein each spot is between1 pixel and 5 pixels in size.
 15. The system of claim 11, wherein therelative location of the plurality of spots is determined based upon aGaussian distribution.
 16. The system of claim 11, wherein the relativelocation of the plurality of spots is determined based upon a pointspread function.
 17. The system of claim 11, wherein the calibratingimaging cycle further comprises sub-dividing the imaged portion of thesubstrate into a plurality of tiles.
 18. The system of claim 17, whereinthe processing system if further configured to determine correctioncoefficients for each of the plurality of tiles.